#include <amxmodx>
#include <engine>
#include <rpgx>

new upgrade_id;

public plugin_init()
	register_plugin("Recoil- RPGx Upgrade", "2.1", "roflmao456");

public RPGx_OnPluginReady()
	upgrade_id = RPGx_MakeUpgrade("Recoil-", 5, 15, 20);

public client_PreThink(id){
	new level = RPGx_GetUpgradeLevel(id, upgrade_id);
	if(level){
		new Float:punchangle[3], Float:lowre;
		entity_get_vector(id, EV_VEC_punchangle, punchangle);
		lowre = float(level) * 0.05;
		punchangle[0] -= punchangle[0] * lowre;
		punchangle[1] -= punchangle[1] * lowre;
		punchangle[2] -= punchangle[2] * lowre;
		entity_set_vector(id, EV_VEC_punchangle, punchangle);
		}
	}